import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export default new Router({
  routes: [
    {
      path: '/',
      hidden: true,
      redirect: '/home'
    },
    {
      path:'/bag',
      name:'bag',
      component:()=>import("@/pages/bag/index.vue"),
      meta:{name:'书包',icon:['../../static/img/v2_qtnhdf.png','../../static/img/v2_qtngqe.png'],nowIndex:0},
      children:[
        {
          path:'/bag',
          redirect:'/bag/bagAll',
          hidden:true
        },
        {
          path: '/bag/bagAll',
          name: 'bagAll',
          component: () => import("../pages/bag/bagAll.vue"),
          meta: { name: '全部', icon: '', nowIndex:0 ,childrenIndex:'0'}
        },
        {
          path: '/bag/bagHoard',
          name: 'bagHoard',
          component: () => import("../pages/bag/bagHoard.vue"),
          meta: { name: '收藏', icon: '', nowIndex:0 }
        },
        {
          path: '/bag/bagTake',
          name: 'bagTake',
          component: () => import("../pages/bag/bagTake.vue"),
          meta: { name: '订阅', icon: '', nowIndex:0 }
        },
        {
          path: '/bag/load',
          name: 'load',
          component: () => import("../pages/bag/load.vue"),
          meta: { name: '下载', icon: '', nowIndex:0 }
        },
        {
          path: '/bag/comment',
          name: 'comment',
          component: () => import("../pages/bag/comment.vue"),
          meta: { name: '点赞评论', icon: '', nowIndex:0 }
        },
       
      ]
    },
    {
      path:'/home',
      name:'homes',
      redirect:'/home/tui',
      component:()=>import("@/pages/home/index.vue"),
      meta:{name:'书架',icon:['../../static/img/v2_qtngr9.png','../../static/img/v2_qtnhbl.png'],nowIndex:1},
      children:[
        {
          path:'/home/tui',
          name:'tuij',
          component:()=>import("@/pages/home/tuijian.vue"),
          meta:{name:'推荐',icon:'',nowIndex:1}
        },
        {
          path:'/home/vip',
          name:'vipbookes',
          component:()=>import("@/pages/home/vipBook.vue"),
          meta:{name:'vip',icon:'',nowIndex:1}
        },
        {
          path:'/home/goodBook',
          name:'goodbookes',
          component:()=>import("@/pages/home/goodBook.vue"),
          meta:{name:'畅销书',icon:'',nowIndex:1}
        },
        {
          path:'/home/boy',
          name:'boybookes',
          component:()=>import("@/pages/home/boy.vue"),
          meta:{name:'男生',icon:'',nowIndex:1}
        },
        {
          path:'/home/girl',
          name:'girlbookes',
          component:()=>import("@/pages/home/girl.vue"),
          meta:{name:'女生',icon:'',nowIndex:1}
        },{
          path:'/home/history',
          name:'historybookes',
          component:()=>import("@/pages/home/history.vue"),
          meta:{name:'历史',icon:'',nowIndex:1}
        },
        {
          path:'/home/baby',
          name:'babybookes',
          component:()=>import("@/pages/home/baby.vue"),
          meta:{name:'儿童',icon:'',nowIndex:1}
        },
      ]
    },
    {
      path:'/playmusic',
      name:'musices',
      component:()=>import('@/components/playmusic/index.vue'),
      meta:{icon:['../../static/img/v2_qskzvg.png','../../static/img/v2_qtnh6n.png ']}
    },
    {
      path: '/social',
      name: 'social',
      redirect: '/social/authortalk',
      component: () => import("@/pages/social/index.vue"),
      meta: { name: '社圈', icon: ['../../static/img/v2_qtnhre.png','../../static/img/v2_qtngro.png'], nowIndex: 2 },
      children: [
        // {
        //   path: '/social',
        //   redirect: '/social/authortalk',
        //   hidden:true
        // },
        {
          path: '/social/authortalk',
          name: 'authorTalk',
          component: () => import("../pages/social/social-authorTalk.vue"),
          meta: { name: '作者说', icon: '', nowIndex:2 }
        },
        {
          path: '/social/bookcircle',
          name: 'bookcircle',
          component: () => import("../pages/social/social-book.vue"),
          meta: { name: '书圈', icon: '', nowIndex:2}
        } ,
        {
          path: '/social/attention',
          name: 'attention',
          component: () => import("../pages/social/social-attention.vue"),
          meta: { name: '关注作者', icon: '', nowIndex:2}
        },
        {
          path: '/social/master',
          name: 'master',
          component: () => import("../pages/social/social-Master.vue"),
          meta: { name: '推荐朋友', icon: '', nowIndex:2}
        },
        // {
        //   path: '/social/tanbi',
        //   name: 'tanbi',
        //   component: () => import("../pages/social/social-tanbi.vue"),
        //   meta: { name: '耽美', icon: '', nowIndex:2}
        // }
      ]
    },
    {
      path:'/my',
      name:'my',
      component:()=>import("@/pages/my/index.vue"),
      meta:{name:'我的',icon:['../../static/img/v2_qtni0x.png','../../static/img/v2_qtngwb.png'],nowIndex:3}
    },
    {
      path:'/search',
      name:'searchs',
      hidden:true,
      component:()=>import('@/components/search/index.vue')
    },
    {
      path:'/details',
      name:'details',
      hidden:true,
      meta:{index:4},
      component:()=>import('@/components/details/index.vue')
    },
    {
      path:'/login',
      name:'logins',
      hidden:true,
     
      component:()=>import('@/components/login/index.vue')
    },
    {
      path:'/register',
      name:'register',
      hidden:true,
      component:()=>import('@/components/register/index.vue')
    },
    {
      path:'/playmusic',
      name:'musices',
      hidden:true,
      component:()=>import('@/components/playmusic/index.vue')
    },{
      path:'/more',
      name:'mores',
      hidden:true,
      component:()=>import('@/components/moreDate/index.vue')
    },
    {
      path:'/searchPage',
      name:'searchPages',
      hidden:true,
      component:()=>import('@/components/search/search.vue')
    },
    {
      path:'/classify',
      name:'classify',
      hidden:true,
      component:()=>import('@/pages/home/classify.vue')
    },
    {
      path:'/checkstand',
      name:'checkstand',
      hidden:true,
      component:()=>import('@/pages/my/checkstand.vue')
    },
  ]
})
